import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hu
 * Date: 2024-04-28
 * Time: 18:07
 */
public class Test {
    public static void main(String[] args) {
        int num =
        print()
    }
    public static void print(int num){
        if(num > 9){
            print(num / 10);
        }
        System.out.println(num % 10);
    }
    /*public static void main(String[] args) {
        int n = 5;
        int ret = factor(n);
        System.out.println("ret " + ret);
    }
    public static int factor(int n){
        if(n == 1){
            return 1;
        }
        return n * factor(n - 1);
    }*/
    /*public static void main(String[] args) {
        int a = 10;
        int b = 20;
        add(a,b);
        double c = 10;
        double d = 20;
        add(c,d);
        int x = 1;
        int y = 2;
        int z = 3;
        add(x, y, z);

    }
    public static int add(int x,int y){
        System.out.println(x+y);
        return x + y;
    }
    public static double add(double x,double y){
        System.out.println(x+y);
        return x + y;
    }
    public static int add(int x,int y,int z){
        System.out.println(x+y+z);
        return x + y + z;*/
   /* public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 5 ; i++) {
            sum += factor(i);
        }
        System.out.println(sum);
    }
    public static int factor(int n){
        int result = 1;
        for (int i = 1; i <= n; i++) {
            result *= i;
        }
        return result;
    }*/
    /*public static void main(String[] args) {

    }
*/
    /*public static void main(String[] args) {
        //计算两个数字相加
        int a = 20;
        int b = 30;
        int ret = add(a,b);
        System.out.println(ret);
    }
    public static int add(int x,int y){
        return x + y;
    }*/
    public static void main7(String[] args) {
        Random random = new Random();
        Scanner sc = new Scanner(System.in);
        System.out.println("输入想要输入的数：");
        int toGuess = random.nextInt(100);
        while(true){
            int num = sc.nextInt();
            if(num > toGuess){
                System.out.println("猜大了");
            }else if(num < toGuess){
                System.out.println("猜小了");
            }else{
                System.out.println("猜对了：" + num);
                break;
            }

        }
        sc.close();
    }
    //猜数字游戏
    public static void main6(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int count = 0;
        while(num !=0){
            count++;
            num = num & (num - 1);
        }
        System.out.println("该数二进制1的个数有：" + count + "个");
    }
    public static void main5(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入想要输入的数");
        int num = sc.nextInt();
        int count = 0;
        while(num != 0){
            if(num % 2 != 0) {
                count++;
            }num /= 2;
        }
        System.out.println("二进制中的个数为：" + count);
    }
    public static void main4(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ret = 0;
        while(b != 0){
            ret = a % b;
            a = b;
            b = ret;
        }
        System.out.println(a);
    }
    public static void main3(String[] args) {
        double sum = 0;
        for (int i = 1; i <= 100; i++) {
            if(i % 2 ==1){
                sum += 1.0 / i;
            }else if(i % 2 == 0){
                sum -= 1.0 / i;
            }
        }
        System.out.println(sum);
    }
    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数字： ");
        int num = sc.nextInt();
        for (int i = 0; i < num; i++) {
            for (int k = 0; k < num; k++) {
                if(i == k || i + k == num - 1){
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }
    }
    public static void main1(String[] args) {
        int num = 1;
        int i = 0;
        for (num = 2; num <= 100; num++) {
            for (i = 2; i <= num; i++) {
                if (num % i == 0) {
                    break;
                }
            }
            if (num == i) {
                System.out.println(num);
        }
        }
    }
}